<!--  -->
<template>
  <div style="margin-top: 20px">
    <div>
      <span style="font-size: 18px; font-weight: bold">{{ label }}</span>
      <a-switch :checked="checked == 1" style="margin: 0 20px" @change="onChange" />
    </div>
    <div v-if="checked == 1">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: ['label', 'checked'],
  components: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  methods: {
    onChange(checked) {
      this.$emit('getChecked', checked ? 1 : 0)
    },
  },
  created() {},
  mounted() {},
}
</script>
<style scoped>
</style>